<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 利用new Object()
        const obj = new Object()  // 创建了一个空对象
        console.log(obj)
        obj.name = '俊俊'
        obj.age = 3
        obj.dance = function () {
            console.log('会社会摇')
        }
        console.log(obj)

        const p = new Object({ name: '霖霖', age: 18 })
        console.log(p)

        // 语法糖
        // const obj = {}  // ==> const obj = new Object()
        // const arr = []  // ==> const arr = new Array()
    </script>
</body>

</html>